/*
 * @desc:
 * @LastEditTime: 2024-03-19 17:45:23
 * @params:
 * @return::
 */
const express = require("express");
const articleCtrl = require("../controller/ article");
const articleValidator = require("../validator/article");
const auth = require("../middleware/auth");

const router = express.Router();

// 创建文章
router.post(
  "/create",
  // auth,
  // articleValidator.createArticle,
  articleCtrl.createArticle
);

router.get("/:articleId", articleValidator.getArticle, articleCtrl.getArticle);

router.post("/likeArticle", articleCtrl.likeArticle);

router.get("/", articleCtrl.getArticles);

router.put("/addComments", articleCtrl.addComments);

router.delete("/deleteArticle", articleCtrl.deleteArticle);

module.exports = router;
